home *** CD-ROM | disk | FTP | other *** search
/ Mission to McDonaldLand / Mission To McDonaldLand.iso / covplat.dxr / 00007_Script_Go to Marker < prev    next >
Text File  |  1998-10-22  |  2KB  |  81 lines

  1. -- Marker  Go to/Play Marker
  2.  
  3. -- nav
  4. -- drag to a sprite 
  5.  
  6. -- Allows author to assign which event will cause the 'go to label' action
  7. -- drag to sprite
  8. -- also functions through lingo by handling message 'initGotoMarker', 
  9. -- for example if this behavior was assigned to sprite 5, use
  10. -- sendsprite 5, #initGotoMarker
  11.  
  12. property  whichEvent, whichLabel,playmode
  13.  
  14. on initGotoMarker me
  15.   init me
  16. end
  17.  
  18. on mouseUp me
  19.   if whichEvent = #mouseup    then init me
  20. end
  21.  
  22. on prepareFrame me
  23.   if whichEvent = #prepareframe then init me
  24. end
  25.  
  26. on exitFrame me
  27.   if whichEvent = #exitframe  then init me
  28. end
  29.  
  30. on init me
  31.   if the playmode of me = #"Go to" then
  32.     case ( whichLabel ) of:
  33.       #Previous: go to marker( -1 )
  34.       #Loop:     go to marker(  0 )
  35.       #Next:     go to marker(  1 )
  36.       otherwise:
  37.         go to whichLabel    
  38.     end case
  39.   else
  40.     case ( whichLabel ) of:
  41.       #Previous: play marker( -1 )
  42.       #Loop:     play marker(  0 )
  43.       #Next:     play marker(  1 )
  44.       otherwise:
  45.         play whichLabel    
  46.     end case
  47.   end if
  48.   
  49. end
  50.  
  51.  
  52.  
  53.  
  54. ---
  55.  
  56. on getPropertyDescriptionList
  57.   set p_list = [ ¼
  58.     #WhichLabel: [ #comment:   "Destination Marker:", ¼
  59.                     #format:   #marker, ¼
  60.                    #default:  "#Loop" ], ¼
  61.     #WhichEvent: [ #comment:   "Initializing Event:", ¼
  62.                     #format:   #symbol, ¼
  63.                      #range: [ #MouseUp, #PrepareFrame, #ExitFrame, #InitGotoMarker], ¼
  64.                    #default:   #MouseUp ], ¼
  65.       #playMode: [ #comment:   "Play Mode:", ¼
  66.                     #format:   #symbol, ¼
  67.                      #range: [ #"Go to", #"Play and Return" ], ¼
  68.                    #default:   #"Go to" ] ¼
  69.   ]
  70.   return p_list
  71. end
  72.  
  73. on getBehaviorDescription
  74.   return ¼
  75. "Moves the Playback Head to a designated marker when the specified event occurs.  Drag to a sprite or a frame in the script channel." && RETURN & ¼
  76. "PARAMETERS:" && RETURN & ¼
  77. "ò Destination Marker - Choose from a list of all marker names in the current movie or choose Previous, Loop (Current), or Next."  && RETURN & ¼
  78. "ò Initializing Event - Specify the event that triggers the behavior." & RETURN & ¼
  79. "ò Play Mode - Choose Play and Return to make the Playback Head return to the current location when the Play Done behavior is encountered. Choose Go To to make the Playback Head continue from the specified frame until explicitly sent to a new location." 
  80. end
  81.